<script setup>
import { ref } from "vue";

defineProps({
  message: String,
});
const emit = defineEmits(["get-message"]);

const onClick = () => {
  emit("get-message", "子组件向父组件传递数据");
};
</script>

<template>
  <div>
    {{ message }}
    <button @click="onClick">点击</button>
  </div>
</template>

<style scoped lang="scss"></style>
